<?php

class Mahasiswa extends CI_Controller {

    function __construct() {
        parent::__construct();
        $this->load->model('model_user');
        if ($this->model_user->auth() == 0 || $this->model_user->auth() !== 1) {
            redirect('login/index');
        } else {
            if ($this->session->userdata['level'] == 'dosen') {
                redirect('dosen');
            }
        }
    }

    function index() {
        $data['nama'] = $this->session->userdata['nama'];
        $data['main_content'] = 'welcome';
        $this->load->view('includes/template', $data);
    }

}

?>
